#include <iostream>
#include <string>
using namespace std;


class Parent
{
public:
	virtual void Print() 
	{
		cout << "Parent: virtual void Print()" << endl;
	}
	
private:
	string _name = "Peter";
};

class Children:public Parent
{
public:
	virtual void Print() 
	{
		cout << "Children: virtual void Print()" << endl;
	}
private:
	int  _age = 10;
};

void test01(Parent &p)
{
	p.Print();

}
void test02(Parent* p)
{
	p->Print();
}
int main()
{
	Parent p;
	Children ch;
	test01(p);
	test01(ch);
	cout << endl;
	test02(&p);
	test02(&ch);
	return 0;
}